package com.bruce.pattern.behavioral.visitor.demo1;

import lombok.extern.slf4j.Slf4j;

/**
 * Created by bruce on 2018/11/11 19:43
 */
@Slf4j
public class ComputerPartDisplayVisitor implements ComputerPartVisitor {
    @Override
    public void visit(Keyboard keyboard) {
        log.info(keyboard.getName());
    }

    @Override
    public void visit(Monitor monitor) {
        log.info(monitor.getName());
    }

    @Override
    public void visit(Mouse mouse) {
        log.info(mouse.getName());
    }

    @Override
    public void visit(Computer computer) {
        log.info(computer.getName());
    }
}
